package com.gpframework.common.enums;

import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

/**
 * @author BrinedFish
 * @create 2022-05-09 20:12
 */
@Getter
public enum RoleKeyEnum {

    /**
     * common_order_audit#audit_type
     */
    ADMIN("超级管理员", "admin"),
    CEO("总经理", "CEO"),
    GENERAL_MANAGER("副总经理", "GeneralManager"),
    WAREHOUSE_MANAGER("仓库经理", "WarehouseManager"),
    WARE_HOUSE_WORKER("仓库文员", "WareHouseWorker"),
    STORE_MANAGER("店长", "StoreManager"),
    MORE_JOB("多岗位替代人", "moreJob"),
    OFFICE_WORKER("开单文员", "OfficeWorker"),
    SALE_WORKER("销售员", "SaleWorker"),
    SHIPPER_LEADER("拿货组长", "ShipperLeader"),
    SHIPPER("拿货员", "Shipper"),
    STOCK_CLERK_LEADER("备货组长", "StockClerkLeader"),
    STOCK_CLERK("备货员", "StockClerk"),
    DELIVERY_LEADER("中转发货主管", "DeliveryLeader"),
    DELIVERY("中转送货员", "Delivery"),
    SCHEDULER_GROUP_LEADER("发货组长", "SchedulerGroupLeader"),
    TAKE_MANAGER("收货组长", "TakeManager"),
    SCHEDULER_GROUP("发货员", "SchedulerGroup"),
    TAKE("收货员", "Take"),
    INFO_CREAT("信息录入", "InfoCreat"),
    QC("QC", "QC"),
    PRODUCE_WORKER("生产文员", "ProduceWorker"),
    ;
    /**
     * 业务名称
     */
    private String name;

    private String key;

    private RoleKeyEnum() {
    }

    private RoleKeyEnum(String name) {
        this.name = name;
    }

    private RoleKeyEnum(String name, String key) {
        this.name = name;
        this.key = key;
    }

    /**
     * 可进行流程流转操作的角色
     * @return
     */
    public static List<String> confirmRoleKey() {
        List<String> roleKeyList = new ArrayList<>();
        roleKeyList.add(GENERAL_MANAGER.getKey());
        roleKeyList.add(WAREHOUSE_MANAGER.getKey());
        roleKeyList.add(MORE_JOB.getKey());
        roleKeyList.add(SHIPPER_LEADER.getKey());
        roleKeyList.add(SHIPPER.getKey());
        roleKeyList.add(STOCK_CLERK_LEADER.getKey());
        roleKeyList.add(STOCK_CLERK.getKey());
        roleKeyList.add(DELIVERY_LEADER.getKey());
        roleKeyList.add(DELIVERY.getKey());
        roleKeyList.add(SCHEDULER_GROUP_LEADER.getKey());
        roleKeyList.add(SCHEDULER_GROUP.getKey());
        return roleKeyList;
    }


    /**
     * 可进行QC流程流转操作的角色
     * @return
     */
    public static List<String> confirmQCRoleKey() {
        List<String> roleKeyList = new ArrayList<>();
        return roleKeyList;
    }

}
